<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增公众号配置信息')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-wechatConfig-add">

                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">环境：</label>
                    <div class="col-sm-8">
                        <select class="form-control m-b" name="envType">
                            <option th:each="dict : ${activeProfiles}" th:text="${dict}"
                                    th:value="${dict}"></option>
                        </select>
                    </div>
                </div>


            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">微信配置标识：</label>
                <div class="col-sm-8">
                    <input name="configCode" class="form-control" type="text" required>
                </div>
            </div>

            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">微信appid：</label>
                <div class="col-sm-8">
                    <input name="appId" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">微信 appsecret：</label>
                <div class="col-sm-8">
                    <input name="appsecret" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">商户id：</label>
                <div class="col-sm-8">
                    <input name="mchId" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">签名key：</label>
                <div class="col-sm-8">
                    <input name="signKey" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">证书地址：</label>
                <div class="col-sm-8">
                    <input name="certFile" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">token令牌：</label>
                <div class="col-sm-8">
                    <input name="token" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">消息加解密密钥：</label>
                <div class="col-sm-8">
                    <input name="encodingAesKey" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">创建日期：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        <input name="gmtCreate" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">更新日期：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        <input name="gmtModified" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script type="text/javascript">
        var prefix = ctx + "system/wechatConfig"
        $("#form-wechatConfig-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-wechatConfig-add').serialize());
            }
        }

        $("input[name='gmtCreate']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='gmtModified']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>